import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/values.dart';
import 'package:moose_app/ui/widgets/user/user_avatar.dart';
import 'package:qr_flutter/qr_flutter.dart';

class ATHQrCodeScreen extends StatelessWidget {
  static final String routeName = "app://qrCode";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(centerTitle: false, title: Text("我的二维码")),
      body: Container(
        height: kSize800,
        width: double.infinity,
        margin:
            EdgeInsets.symmetric(horizontal: kSize24).copyWith(top: kSize160),
        decoration: kCommonBoxDecoration,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: <Widget>[
            Padding(
              padding: EdgeInsets.only(left: kSize48, top: kSize48),
              child: Row(
                children: <Widget>[
                  ATHUserAvatar(),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Padding(
                        padding: EdgeInsets.only(left: kSize24),
                        child: Row(
                          children: <Widget>[
                            Text(
                              "李白",
                              style: TextStyle(
                                  color: kColor33, fontSize: kFontSize36),
                            ),
                            Icon(
                              Icons.whatshot,
                              color: Colors.red,
                            )
                          ],
                        ),
                      ),
                      Padding(
                        padding: EdgeInsets.only(left: kSize24),
                        child: Row(children: <Widget>[
                          Text(
                            "中国",
                            style: TextStyle(color: kColor33),
                          )
                        ]),
                      )
                    ],
                  )
                ],
              ),
            ),
            Container(
              alignment: Alignment.center,
              child: QrImage(
                data: "微信公众号：全栈技术部",
                version: QrVersions.auto,
                size: kSize360,
                padding: EdgeInsets.all(kSize20),
              ),
            ),
            Container(
              padding: EdgeInsets.symmetric(vertical: kSize24),
              child: Text(
                "扫一扫上面的二维码图案，加我 Moose",
                style: TextStyle(fontSize: kFontSize22, color: kColor99),
              ),
            )
          ],
        ),
      ),
    );
  }
}
